<?php
/*
 * Created on 11 juin 2009
 * Created by Ludovic Reenaers
 * lreenaers@hotmail.com
 */
abstract class Generator implements Dumpable{
	protected $params;
	protected $content="";
	protected $error="";
	protected $Factory = null;
	protected $translator;
	function __construct($translator,$params,$factory){
		$this->params=$params;
		$this->Factory = $factory;
		$this->translator = $translator;
		
		if(isset($_SESSION["FormManager"]) && $_SESSION["FormManager"]->hasError() && !is_null($this->translator)){
			$err = $this->translator->err;
			$errStr = $_SESSION["FormManager"]->dumpErrors();
			$pth = $_SESSION['config']->pathtosite;
			$this->error .=str_replace(array('{errlabel}','{err}'),array($err,$errStr),file_get_contents($pth."/html/templates/divErr"));
			//$_SESSION["FormManager"]->cleanErrors();
			//echo "cleaned";
		}
		// 		$this->setUp();
	}

	function setUp(){}
	function dump(){}
}
?>
